package com.gopay.common.domain.dps;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;
/**
 * 移动端企业版数字证书分配表
 * @author ZHOUPENG
 * @date   2017年12月4日 上午9:52:38
 */
@Entity
@Table(name = "WA_CERTIFICATE_ALLOCATION")
public class WaCertificateAllocation implements Serializable {
	
	private static final long serialVersionUID = 1L;
	/**
	 * 主键
	 */
	private Integer id;
	/**
	 * 管理员userId
	 */
	private String managerUserId;
	/**
	 * 财务员userId
	 */
	private String treasurerUserId;
	/**
	 * 数字证书表Id
	 */
	private Long certId;
	/**
	 * 强制更新标识0否 1是
	 */
	private String isUpdate;
	/**
	 * 配置状态 01待更新 02已配置 03已安装
	 */
	private String allocationStatus;
	/**
	 * 版本号
	 */
	private Integer version;
	/**
	 * 创建时间
	 */
	private Date createdTs;
	/**
	 * 最后更新时间
	 */
	private Date lastUptTs;
	/**
	 * 流水表ID
	 */
	private Long certBuyId;
	
	
	@Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "WA_CERTIFICATE_ALLOCATION_SEQ")
    @SequenceGenerator(name = "WA_CERTIFICATE_ALLOCATION_SEQ", allocationSize = 1, initialValue = 1, sequenceName = "WA_CERTIFICATE_ALLOCATION_SEQ")
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "MANAGER_USER_ID")
	public String getManagerUserId() {
		return managerUserId;
	}
	public void setManagerUserId(String managerUserId) {
		this.managerUserId = managerUserId;
	}
	@Column(name = "TREASURER_USER_ID")
	public String getTreasurerUserId() {
		return treasurerUserId;
	}
	public void setTreasurerUserId(String treasurerUserId) {
		this.treasurerUserId = treasurerUserId;
	}
	@Column(name = "CERT_ID")
	public Long getCertId() {
		return certId;
	}
	public void setCertId(Long certId) {
		this.certId = certId;
	}
	@Column(name = "IS_UPDATE")
	public String getIsUpdate() {
		return isUpdate;
	}
	public void setIsUpdate(String isUpdate) {
		this.isUpdate = isUpdate;
	}
	@Column(name = "ALLOCATION_STATUS")
	public String getAllocationStatus() {
		return allocationStatus;
	}
	public void setAllocationStatus(String allocationStatus) {
		this.allocationStatus = allocationStatus;
	}
	@Version
	@Column(name="VERSION")
	public Integer getVersion() {
		return version;
	}
	public void setVersion(Integer version) {
		this.version = version;
	}
	@Column(name = "CREATED_TS")
	public Date getCreatedTs() {
		return createdTs;
	}
	public void setCreatedTs(Date createdTs) {
		this.createdTs = createdTs;
	}
	@Column(name = "LAST_UPT_TS")
	public Date getLastUptTs() {
		return lastUptTs;
	}
	public void setLastUptTs(Date lastUptTs) {
		this.lastUptTs = lastUptTs;
	}
	@Column(name = "CERT_BUY_ID")
	public Long getCertBuyId() {
		return certBuyId;
	}
	public void setCertBuyId(Long certBuyId) {
		this.certBuyId = certBuyId;
	}
	@Override
	public String toString() {
		return "WaCertificateAllocation [id=" + id + ", managerUserId=" + managerUserId + ", treasurerUserId="
				+ treasurerUserId + ", certId=" + certId + ", isUpdate=" + isUpdate + ", allocationStatus="
				+ allocationStatus + ", version=" + version + ", createdTs=" + createdTs + ", lastUptTs=" + lastUptTs
				+ ", certBuyId=" + certBuyId + "]";
	}
	
	
}
